package gat.common.util;

import java.util.HashMap;
import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
/**
 * 配置类
 * 从配置文件中读取数据映射到map
 * 注意：必须实现set方法
 * @author eknows
 * @version 1.0
 * @since 2019/2/13 9:23
 */
@Configuration
@ConfigurationProperties(prefix = "baidu")
@EnableConfigurationProperties(BaiduSemMapConfig.class)
@Primary
public class BaiduSemMapConfig {
    /**
     * 从配置文件中读取的Map数据
     * 注意：名称必须与配置文件中保持一致
     */
    private Map<String, String> semMap = new HashMap<>();
    public Map<String, String> getSemMap() {
        return semMap;
    }
    public void setSemMap(Map<String, String> semMap) {
        this.semMap = semMap;
    }
}
